s = "床前明月光，疑是地上霜。"
word = ''
for j in s:
    if j in "，。":
        print("{:^10}".format(word))
        word = ""
        continue
    word += j
